-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory leaks related to the cache of securityStateReference. #143
base: main
Are you sure you want to change the base?
Conversation
It isn't written in an ideal way as you put too many changes in one commit without any test cases. Thus, it's going to take a while for us to review before accepting it. |
Enabled the previous test case written for #93. There are another 11 changes, and each requires a new test case. |
Instead of accepting this pull request as a whole, I decided to cherry-pick the necessary changes required by #93 first and shipped in release 7.1.13 with its test case. That branch might be hit more often, so shipping the fix earlier would make more sense. Other changes, though useful, are associated with rarer cases that are much harder to trigger (and tested by test cases). So, I can gradually cherry-pick the rest when new test cases are created. |
@@ -523,6 +526,9 @@ def prepare_response_message( | |||
elif securityLevel == 3: | |||
msgFlags |= 0x03 | |||
else: | |||
if securityModel in snmpEngine.security_models: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def prepare_data_elements
in rfc3412.py
already blocked invalid msgFlags from being passed on, so it is impossible to have a securityLevel
value here.
Sorry for my late response.
Here is a pull request to fix the issue #93.